Skip to content

Conversation

@hs-apotell
Copy link
Collaborator

Posix threads are available only on Unix (and unix like) platforms. Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS [email protected]

Posix threads are available only on Unix (and unix like) platforms.
Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS <[email protected]>
@hs-apotell
Copy link
Collaborator Author

@parrt Can you assist with getting this merged to master. Thanks!

@parrt
Copy link
Member

parrt commented Feb 25, 2023

hyperbusy but soon. we have similar PR btw.

@jmairboeck
Copy link
Contributor

Threads is a built-in meta-target of CMake and should resolve to nothing on platforms which don't require a separate threading library anyway. So this is probably not needed.

@hs-apotell
Copy link
Collaborator Author

When antlr is exported as a dependency, Threads ends up in the antlr4.cmake file which doesn't resolve to nothing, at least on Windows. This is the currently the case for Surelog where the builds are failing for projects dependent on Surelog library, only on Windows where cmake fails to resolve it.

@hs-apotell
Copy link
Collaborator Author

@jmairboeck @parrt Any update on this PR?

@parrt parrt added this to the 4.12.1 milestone Mar 3, 2023
@parrt parrt merged commit d641b6b into antlr:dev Mar 3, 2023
@hs-apotell hs-apotell deleted the threads branch March 15, 2023 19:43
jimidle pushed a commit to jimidle/antlr4 that referenced this pull request Mar 28, 2023
Posix threads are available only on Unix (and unix like) platforms.
Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS <[email protected]>
Signed-off-by: Jim.Idle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants